import { http } from '@/api/request'

export function fnGetCallChainList(params: {
  startTime: number,
  endTime: number,
}) {
  return http.get('/operations/distribute_tracing', { params });
}

export function fnGetCallChainData(param: {
  query_params: any,
  id: string,
}) {
  return http.post('/operations/distribute_tracing', param);
}

export function fnGetFaultList(params: {
  startTime: number,
  endTime: number,
}) {
  return http.get('/operations/alarm', { params });
}

export function fnGetAllOsTopData(params) {
  return http.post('rest/atop_views/v1/ostop_data', JSON.stringify(params));
}

export const osMindApi = {
  fnGetCallChainList,
  fnGetCallChainData,
  fnGetFaultList,
  fnGetAllOsTopData
}
